#pragma once
#include"Commond.h"
#include"Thread_Cache.h"

static void* Concurrentnew(size_t size)
{
	assert(size <= MAX_BYTES);
	if (pTLSThreadCache == nullptr)
	{
		pTLSThreadCache = new ThreadCache;
	}
	void* obj = pTLSThreadCache->Allocate(size);
	return obj;
}
static void Concurrentdelete(void* obj, size_t size)
{
	assert(pTLSThreadCache);
	pTLSThreadCache->DeAllocate(obj, size);
}
